# -*- coding: utf-8 -*-

def LinearFind(arr, key):
    n = len(arr)
    i = 0
    while i < n:
        if arr[i] == key:
            return i
        i += 1
    return -1

s1 = [100,22,44,0,2,492,3,20,38]
key = 0
r = LinearFind(s1, key)
if r != -1:
    print('元素%d找到，其下标为%d' % (key, r))
else:
    print('元素%d没有找到' % (key))    

